'use client';
import React from 'react';
import { Button } from 'antd';
import { ArrowLeftOutlined } from '@ant-design/icons';
import { useRouter } from 'next/navigation';

export default function BackButton({ children, style }: { children?: React.ReactNode; style?: React.CSSProperties }) {
  const router = useRouter();
  return (
    <Button icon={<ArrowLeftOutlined />} onClick={() => router.back()} style={style}>
      {children || '返回'}
    </Button>
  );
} 